﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel;
using Quebec.Logging.Services.Server;
using Quebec.Logging.Services;

namespace Quebec.Silverlight.Logging
{
	/// <summary>
	/// The client side WCF interface.
	/// We allow the client to call server side operation async, we must define this client side interface.
	/// In WCF, the Server don't know if its called anync or not. It's the client that makes the async call.
	/// </summary>
	[ServiceContract(Namespace = ServiceContractNamespace.CONTRACT_NAMESPACE)]
	public interface ILoggingService
	{
		[OperationContract(AsyncPattern = true, Name = "BeginDebug")]
		IAsyncResult BeginDebug(string applicationName, object message, System.AsyncCallback callback, object asyncState);
		void EndDebug(IAsyncResult result);

		[OperationContract(AsyncPattern = true, Name = "BeginInfo")]
		IAsyncResult BeginInfo(string applicationName, object message, System.AsyncCallback callback, object asyncState);
		void EndInfo(IAsyncResult result);

		[OperationContract(AsyncPattern = true, Name = "BeginError")]
		IAsyncResult BeginError(string applicationName, object message, System.AsyncCallback callback, object asyncState);
		void EndError(IAsyncResult result);

		[OperationContract(AsyncPattern = true, Name = "BeginFatal")]
		IAsyncResult BeginFatal(string applicationName, object message, System.AsyncCallback callback, object asyncState);
		void EndFatal(IAsyncResult result);

		[OperationContract(AsyncPattern = true, Name = "BeginWarn")]
		IAsyncResult BeginWarn(string applicationName, object message, System.AsyncCallback callback, object asyncState);
		void EndWarn(IAsyncResult result);
	}
}
